A popup window is a user interface (UI) component that is often used during development and application, which displays a popup window message in a popup manner and performs an interactive operation with a user. For example, when a user closes a file, a mobile terminal pops up a popup window. A popup window message displayed by the popup window may include a prompt message “Do you want to close this file”, an “OK” button, and a “Cancel” button. The user can click a button to close the file or cancel closing the file.
When there is a popup window message on a mobile terminal, the mobile terminal needs to display the popup window message to a user, for the user to view the popup window message and perform an interactive operation. As a mobile terminal has a small screen size, the mobile terminal can only display one popup window message each time. Currently, a mobile terminal may display a popup window message through the following methods. Specifically, a mobile terminal receives a popup window message sent by a server, or a mobile terminal receives a command that triggers a popup window message, and inserts the popup window message to the end of a message queue for waiting. The message queue is a first-in-first-out queue. A popup window message at the first place of the queue has waited for a longest period of time. The mobile terminal dequeues the popup window message at the first place of the message queue, creates a popup window, loads the dequeued popup window message into the created popup window, and displays the popup window to a user.
However, a popup window message is often displayed according to a waiting time of the popup window message, and a popup window message that has waited for a longest period time is displayed first. However, some popup window messages are relatively important. For example, a popup window message such as an award prompt may be automatically destroyed after being displayed for a short time. If these popup window messages have waited for a short period of time, these important popup window messages with strong time effectiveness may not be displayed in time, leading to loss of these important popup window messages.